package com.glodon.paas.framework.registry.server.zk.watcher;

import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;

/**
 * Watch the changes of all services and renew the api cache
 *
 * @author Don Li
 */
public class ServiceRootWatcher implements Watcher {
    private ZooKeeper zk;

    public ServiceRootWatcher(ZooKeeper zk) {
        this.zk = zk;
    }

    @Override
    public void process(WatchedEvent event) {
        // when service added or deleted
        if (event.getType() == Event.EventType.NodeChildrenChanged) {

        }
    }
}
